package com.example.car.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.car.R
import com.example.car.entity.CarPayEntity

class CarAdapter : BaseQuickAdapter<CarPayEntity,BaseViewHolder>(R.layout.item_car) {
    override fun convert(holder: BaseViewHolder, item: CarPayEntity) {
        holder.getView<TextView>(R.id.tv_parking_number).text = "${item.plateNumber}"
        holder.getView<TextView>(R.id.tv_area).text = "张先生"
        holder.getView<TextView>(R.id.tv_type).text = "入场：\n${item.entryTime}"
        holder.getView<TextView>(R.id.tv_user).text = "离场：\n${item.exitTime}"
        holder.getView<TextView>(R.id.tv_license).text = "${item.parkingSpaceNumber}"
    }
}